.class abstract Lcom/burstly/lib/ui/SafeInvoker;
.super Ljava/lang/Object;
.source "SafeInvoker.java"

# interfaces
.implements Ljava/lang/Runnable;


# static fields
.field private static final LOG:Lcom/burstly/lib/util/LoggerExt;


# instance fields
.field private final mBurstlyViewId:Ljava/lang/String;

.field private final mListener:Lcom/burstly/lib/ui/IBurstlyAdListener;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 30
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/ui/SafeInvoker;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method constructor <init>(Lcom/burstly/lib/ui/IBurstlyAdListener;Ljava/lang/String;)V
    .locals 0
    .parameter "listener"
    .parameter "viewId"

    .prologue
    .line 48
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 49
    iput-object p1, p0, Lcom/burstly/lib/ui/SafeInvoker;->mListener:Lcom/burstly/lib/ui/IBurstlyAdListener;

    .line 50
    iput-object p2, p0, Lcom/burstly/lib/ui/SafeInvoker;->mBurstlyViewId:Ljava/lang/String;

    .line 51
    return-void
.end method


# virtual methods
.method abstract invoke()V
.end method

.method public run()V
    .locals 5

    .prologue
    .line 55
    iget-object v1, p0, Lcom/burstly/lib/ui/SafeInvoker;->mListener:Lcom/burstly/lib/ui/IBurstlyAdListener;

    if-eqz v1, :cond_0

    .line 57
    :try_start_0
    invoke-virtual {p0}, Lcom/burstly/lib/ui/SafeInvoker;->invoke()V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    .line 65
    :cond_0
    :goto_0
    return-void

    .line 59
    :catch_0
    move-exception v0

    .line 60
    .local v0, e:Ljava/lang/Throwable;
    sget-object v1, Lcom/burstly/lib/ui/SafeInvoker;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v2, p0, Lcom/burstly/lib/ui/SafeInvoker;->mBurstlyViewId:Ljava/lang/String;

    const-string v3, "Client`s IBurstlyAdListener has thrown an uncaught exception! Exception is: "

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Object;

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 62
    sget-object v1, Lcom/burstly/lib/ui/SafeInvoker;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v2, p0, Lcom/burstly/lib/ui/SafeInvoker;->mBurstlyViewId:Ljava/lang/String;

    invoke-virtual {v1, v2, v0}, Lcom/burstly/lib/util/LoggerExt;->logThrowable(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_0
.end method
